import { createRouter, createWebHistory } from 'vue-router'

import index from '../views/index.vue'
import main from '../views/main.vue'
import about from '../views/about.vue'
import learnTips from '../views/learn/learnTips.vue'
import marketUpdates from '../views/learn/marketUpdates.vue'
import updatethesystem from '../views/learn/updatethesystem.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/main',
      component: index,
      children: [
        {
          path: '/main',
          name: 'main',
          component: main
        },
        {
          path: '/learn/learn_tips',
          name: 'learn_tips',
          component: learnTips
        },

        {
          path: '/learn/market_updates',
          name: 'market_updates',
          component: marketUpdates
        },

        {
          path: '/learn/updatethesystem',
          name: 'updatethesystem',
          component: updatethesystem
        },

      ]
    }
  ]
})

export default router
